/* Copyright 2001,2002,2003 NAH6 BV
 * All Rights Reserved
 *
 *  $Header: /var/lib/cvs/secphone/ui/rng/fortuna/fnaBlockCypher.h,v 1.4 2003/11/21 16:12:58 itsme Exp $
 *
 *
 * This defines a generic interface to a blockcypher, which is implemented by
 * ui\crypto\cryptoAES.cpp
 *
 * I should have subclassed this....
 *
 */


#ifndef __FNABLOCKCYPHER_H__
//--------------------------------------------------------------------------

#include "vectorutils.h"
#include "crypto.h"

class BlockCypher {
public:
    BlockCypher();
    ~BlockCypher();

    enum { BLOCKSIZE= 16 };                 // in bytes
    enum { KEYSIZE= 32 };                   // in bytes

    void ClearKey();
    bool SetKey(const ByteVector& key);
    const ByteVector& GetKey() const;

    ByteVector Encrypt(const ByteVector& plain);

private:
    unsigned long m_state[60];
    ByteVector m_key;
};

#define __FNABLOCKCYPHER_H__
#endif
